<div id="content">
    <div class="row s_page_title">
        <sa-big-breadcrumbs [items]="['物料跟踪管理','销售订单管理']" icon="fa fa-cubes" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
    </div>
    <sa-widgets-grid>
        <div class="s_table">
            <div sa-widget [editbutton]="false" color="darken" class="clearfix">
                <header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
                    <h2>销售订单管理</h2>
                </header>
                <div>
                    <div class="widget-body no-padding">
                        <div class="page-header clearfix s_table_opreation">
                            <div class="left page-header-btn" style="width: calc(100% - 220px);">
                                <div class="top_module">
                                    <span class="module_text">公司名称</span>
                                    <sa-company-tree companyTreeId="companyTree" (companySelected)="companySelected($event)"></sa-company-tree>
                                </div>
                                <div class="top_module">
                                    <span class="module_text">项目名称
                                    </span>
                                    <div class="s_hover_box">
                                        <select class="select2" id="projectSelect2">
                                            <option value=''></option>
                                        </select>
                                        <div class="s_del_icon" (click)='del_project()'>x</div>
                                    </div>
                                </div>
                                <div class="top_module">
                                    <span class="module_text">销售类型</span>
                                    <select class="module_inp" name="salesType" [(ngModel)]="salesType">
                                        <option value="">全部</option>
                                        <option value="1">销售</option>
                                        <option value="2">测试</option>
                                        <option value="3">样机</option>
                                    </select>
                                </div>
                                <div class="top_module">
                                    <span class="module_text">订单状态</span>
                                    <select class="module_inp" name="isFinish" [(ngModel)]="isFinish">
                                        <option value="">全部</option>
                                        <option value="1">完成</option>
                                        <option value="0">未完成</option>
                                    </select>
                                </div>
                                <div class="selectDate top_module">
                                    <table-select-date [notInit]='true' (outerTime)="datePickerSelected($event)"></table-select-date>
                                </div>

                                <button type="button" class="btn btn-primary" (click)="table_search()">查询</button>
                                <button type="button" class="btn btn-primary" (click)="table_add(bomOrderModal)">添加订单</button>
                                <!-- <button type="button" class="btn btn-primary" style="display: none;"
								(click)="showImportModal(weightModal)">导入报表</button> -->
                            </div>
                            <div class="right top-search">
                                <input type="text" [(ngModel)]="searchKey" (change)="table_search()" class="search-input" placeholder="公司/项目/联系人/地址/录入人">
                                <span class="top-search-box">
                                    <button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </div>
                        <div class="table_scroll">
                            <table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                                <thead>
                                    <tr>
                                        <th>订单编号</th>
                                        <th>项目名称</th>
                                        <th>所属厂区</th>
                                        <th>项目经理</th>
                                        <th>销售类型</th>
                                        <th>订单量(套)</th>
                                        <th>状态</th>
                                        <th>联系人</th>
                                        <th>联系电话</th>
                                        <th>邮寄地址</th>
                                        <th>录入人</th>
                                        <th>录入时间</th>
                                        <th>编辑人</th>
                                        <th>编辑时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr *ngFor="let row of tableData">
                                        <td>{{row.salesOrderNumber}}</td>
                                        <td>{{row.projectName}}</td>
                                        <td>{{row.companyName}}</td>
                                        <td>{{row.pmName}}</td>
                                        <td>
                                            <span *ngIf="row.salesType == '1'">销售</span>
                                            <span *ngIf="row.salesType == '2'">测试</span>
                                            <span *ngIf="row.salesType == '3'">样机</span>
                                        </td>
                                        <td>{{row.totalNum}}</td>
                                        <td>
                                            <span *ngIf="row.isFinish == 0" class="orange">未完成</span>
                                            <span *ngIf="row.isFinish == 1" class="green">已完成</span>
                                        </td>
                                        <td>{{row.linkMan}}</td>
                                        <td>{{row.linkPhone}}</td>
                                        <td>{{row.address}}</td>
                                        <td>{{row.enterMan}}</td>
                                        <td>{{row.enterTime}}</td>
                                        <td>{{row.editMan}}</td>
                                        <td>{{row.editTime}}</td>
                                        <td>
                                            <button type="button" (click)="projectBom(row,bomOrderCodeModal)">查看BOM列表</button>
                                            <button type="button" (click)="table_edit(row,bomOrderModal)">编辑</button>
                                            <button type="button" (click)="table_del(row)">删除</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="table-fix clearfix">
                            <paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
                            </paginator>
                            <button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </sa-widgets-grid>
    <!-- 新增销售订单   弹窗-->
    <section bsModal #bomOrderModal="bs-modal" id="bomOrderModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" (click)="bomOrderClose(bomOrderModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><span *ngIf="formType == 'new'">新增</span><span *ngIf="formType == 'updata'">编辑</span>销售订单</h4>
                </div>
                <form id="bomOrderFrom" class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
                    <div class="modal-body">
                        <div class="row form-horizontal">
                            <div class="form-group col-xs-12 s_fix_select2_width s_fix_select2">
                                <label class="control-label col-xs-2">项目名称<sup>*</sup></label>
                                <div class="col-xs-8">
                                    <input type="hidden" class="form-control" name="projectName" id="projectName" [(ngModel)]='bomOrderFrom.projectName' />
                                    <div class="s_hover_box">
                                        <select class="select2" id="projectNameSelect2From">
                                            <option value=''></option>
                                        </select>
                                        <div class="s_del_icon" (click)='delProjectNameFrom()'>x</div>
                                    </div>
                                    <!-- <input *ngIf="formType == 'updata'" class="form-control" type="text" name="projectNameT" disabled [(ngModel)]='bomOrderFrom.projectName' /> -->
                                </div>
                                <button class="btn btn-link right" (click)="jumpToPage($event,'/bom/project')" style="margin: 0;padding: 6px 0;" title="跳转项目管理页面">>> 新增项目</button>
                            </div>
                            <div class="form-group col-xs-12">
                                <label class="control-label col-xs-2 no-padding-right">所属公司<sup>*</sup></label>
                                <div class="col-xs-10">
                                    <div class="s_hover_box" style="display:block;">
                                        <select class="form-control" [(ngModel)]="bomOrderFrom.companyId" name='projectCompanyName' id="projectCompanyName" (change)="selectCompanyNameChange()">
                                            <option value=''>请选择</option>
                                            <option [value]='item.id' *ngFor="let item of companyNameList">{{item.text}}</option>
                                        </select>
                                    </div>
                                    <!-- <input *ngIf="formType == 'updata'" class="form-control" type="text" name="companyNameT" disabled [(ngModel)]='bomOrderFrom.companyName' /> -->
                                </div>
                            </div>
                            <!-- 项目经理改成可选择 -->
                            <div class="form-group col-xs-12 s_fix_select2_width s_fix_select2">
                                <label class="col-xs-2 control-label">项目经理</label>
                                <div class="col-xs-10">
                                    <input type="hidden" class="form-control" name="pmName" id="pmName" [(ngModel)]='bomOrderFrom.pmId' />
                                    <div class="s_hover_box" style="display:block;">
                                        <select class="select2" id="pmNameSelect2From">
                                            <option value=''></option>
                                        </select>
                                        <div class="s_del_icon" (click)='delpmNameForm()'>x</div>
                                    </div>
                                    <!-- <input class="form-control" type="text" [(ngModel)]='bomOrderFrom.pmName' name='pmName' placeholder="项目经理" /> -->
                                </div>
                            </div>
                            <div class="form-group col-xs-12">
                                <label class="col-xs-2 control-label">销售类型<sup>*</sup></label>
                                <div class="col-xs-10">
                                    <div *ngIf="bomOrderFromSalesType == 1">
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="1" (click)="clickSalesType(1)" checked />销售</label>
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="2" (click)="clickSalesType(2)" />测试</label>
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="3" (click)="clickSalesType(3)" />样机</label>
                                    </div>
                                    <div *ngIf="bomOrderFromSalesType == 2">
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="1" (click)="clickSalesType(1)" />销售</label>
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="2" (click)="clickSalesType(2)" checked />测试</label>
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="3" (click)="clickSalesType(3)" />样机</label>
                                    </div>
                                    <div *ngIf="bomOrderFromSalesType == 3">
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="1" (click)="clickSalesType(1)" />销售</label>
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="2" (click)="clickSalesType(2)" />测试</label>
                                        <label class="col-sm-4" style="margin-bottom:0px;"><input type="radio" class="radioSales" name="salesType" value="3" (click)="clickSalesType(3)" checked />样机</label>
                                    </div>
                                    <!-- <select class="form-control" name="salesType"  [(ngModel)]="bomOrderFrom.salesType">
										<option value="1">销售</option>
										<option value="2">测试</option>  
										<option value="3">样机</option>
									</select> -->
                                </div>
                            </div>
                            <!--<div class="form-group col-xs-12">
								<label class="col-xs-2 control-label">订单数(套)<sup>*</sup></label>
								<div class="col-xs-10">
									<input class="form-control" type="text"  [(ngModel)]='bomOrderFrom.totalNum' name='totalNum'placeholder="订单数"/>
								</div>
							</div>-->
                            <div class="form-group col-xs-12">
                                <label class="col-xs-2 control-label">联系人<sup>*</sup></label>
                                <div class="col-xs-10">
                                    <input class="form-control" type="text" [(ngModel)]='bomOrderFrom.linkMan' name='linkMan' placeholder="联系人" />
                                </div>
                            </div>
                            <div class="form-group col-xs-12">
                                <label class="col-xs-2 control-label">联系电话<sup>*</sup></label>
                                <div class="col-xs-10">
                                    <input class="form-control" type="text" [(ngModel)]='bomOrderFrom.linkPhone' name='linkPhone' placeholder="电话" />
                                </div>
                            </div>
                            <div class="form-group col-xs-12">
                                <label class="col-xs-2 control-label">邮寄地址<sup>*</sup></label>
                                <div class="col-xs-10">
                                    <input class="form-control" type="text" [(ngModel)]='bomOrderFrom.address' name='address' placeholder="地址" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" (click)="bomOrderClose(bomOrderModal)">取消</button>
                        <button type="button" class="btn btn-primary" (click)="bomOrderSubmit(bomOrderModal)">确认</button>
                    </div>
                </form>
            </div>
        </div>
    </section>
    <!-- 新增销售订单 弹窗end-->

    <!-- bom明细   弹窗-->
    <section bsModal #bomOrderCodeModal="bs-modal" id="bomOrderCodeModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:1060px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" (click)="bomOrderCodeClose(bomOrderCodeModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" style="line-height: 32px;">BOM列表
                        <button class="btn btn-link right" (click)="jumpToPage($event,'/bom/hold')" title="跳转BOM编码管理页面">>> BOM维护</button>
                        <button class="btn btn-primary" (click)="addBOMCodeForOrder(bomCodePageModal)" style="margin-left: 24px;">添加BOM</button>
                    </h4>
                </div>
                <div class="modal-body" style="min-height: 240px;max-height: 530px;overflow: auto;">
                    <div class="row form-horizontal">
                        <div class="table_scroll">
                            <table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                                <thead>
                                    <tr>
                                        <th>操作</th>
                                        <th>BOM编码</th>
                                        <th>BOM描述</th>
                                        <th>套数[ 发货数量/下单总数 ]</th>
                                        <th>主机[ 发货数量/下单总数/实际发货数量 ]</th>
                                        <th>传感器[ 发货数量/下单总数/实际发货数量 ]</th>
                                        <th>线材[ 发货数量/下单总数/实际发货数量 ]</th>
                                        <th>录入人</th>
                                        <th>录入时间</th>
                                        <!--<th>编辑人</th>
										<th>编辑时间</th>-->
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr *ngFor="let row of BomTableData">
                                        <td>
                                            <button type="button" (click)="editBOMCode(row,bomOrderCodeEditModal)">编辑</button>
                                            <button type="button" (click)="delBOMCode(row)">删除</button>
                                            <button type="button" (click)="showBomDetail(row,bomDetailModal)">物料明细</button>
                                        </td>
                                        <td>{{row.bomNumber}}</td>
                                        <td>{{row.describe}}</td>
                                        <td>
                                            <span class="orange">{{row.sendNum}}</span> / <span class="green">{{row.num}}</span>
                                        </td>
                                        <td>
                                            <span class="orange">{{row.sendHostNum}}</span> / <span class="green">{{row.hostNum}}</span> / <span class="blue">{{row.sendRealHostNum}}</span>
                                        </td>
                                        <td>
                                            <span class="orange">{{row.sendSensorNum}}</span> / <span class="green">{{row.sensorNum}}</span> / <span class="blue">{{row.sendRealSensorNum}}</span>
                                        </td>
                                        <td>
                                            <span class="orange">{{row.sendWireNum}}</span> / <span class="green">{{row.wireNum}}</span> / <span class="blue">{{row.sendRealWireNum}}</span>
                                        </td>
                                        <td>{{row.enterMan}}</td>
                                        <td>{{row.enterTime}}</td>
                                        <!--<td>{{row.editMan}}</td>
										<td>{{row.editTime}}</td>-->
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div *ngIf="BomTableData.length == 0" style="text-align: center;color: #ccc;line-height: 80px;">暂无数据</div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- bom明细 弹窗end-->

    <!-- 物料明细 -->
    <div bsModal #bomDetailModal="bs-modal" id="bomDetailModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" style="overflow: auto;">
        <div class="modal-dialog modal-lg" style="width: 1000px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" (click)="cancelbomDetailModal(bomDetailModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">平台绑定详情</h4>
                </div>
                <div class="modal-body" style="padding: 15px;">
                    <div class="table_scroll">
                        <table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                            <thead>
                                <tr>
                                    <th>类型</th>
                                    <th>外壳编号</th>
                                    <th>产品名称</th>
                                    <th>BOM编码</th>
                                    <th>数量</th>
                                    <th>录入人</th>
                                    <th>录入时间</th>
                                </tr>
                            </thead>
                            <tbody>

                                <tr *ngFor="let row of bomDetailTableData; let i = index" [attr.data-index]="i" [ngClass]='{selected: row.isChecked }'>
                                    <td>{{row.materielTypeStr?row.materielTypeStr:"--"}}</td>
                                    <td>{{row.hullName}}</td>
                                    <td>{{row.productName}}</td>
                                    <td>{{row.bomNumber}}</td>
                                    <td>{{row.num}}</td>
                                    <td>{{row.enterMan}}</td>
                                    <td>{{row.enterTime}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 物料明细 end-->


    <!-- bom明细编辑   弹窗-->
    <section bsModal #bomOrderCodeEditModal="bs-modal" id="bomOrderCodeEditModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" (click)="bomOrderCodeEditClose(bomOrderCodeEditModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">BOM编码-编辑</h4>
                </div>
                <form id="bomOrderCodeEditFrom" class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="validatorOption">
                    <div class="modal-body">
                        <div class="row form-horizontal">
                            <div class="form-group col-xs-12">
                                <label class="col-xs-2 control-label">订单数(套)<sup>*</sup></label>
                                <div class="col-xs-10">
                                    <input class="form-control" type="text" [(ngModel)]='bomOrderCodeForm.number' name='number' />
                                </div>
                            </div>
                            <div class="form-group col-xs-12">
                                <label class="col-xs-2 control-label">BOM编码<sup>*</sup></label>
                                <div class="col-xs-10 s_fix_select2_width s_fix_select2">
                                    <div class="s_hover_box">
                                        <select class="select2" id="bomNumberEditSelect2">
                                            <option value=''></option>
                                        </select>
                                        <div class="s_del_icon" (click)='delBomNumberEdit()'>x</div>
                                    </div>
                                    <input class="form-control none" type="text" id='newBomNumber' [(ngModel)]='bomOrderCodeForm.newBomNumber' name='newBomNumber' />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" (click)="bomOrderCodeEditClose(bomOrderCodeEditModal)">取消</button>
                        <button type="button" class="btn btn-primary" (click)="bomOrderCodeEditSubmit(bomOrderCodeEditModal)">确认</button>
                    </div>
                </form>
            </div>
        </div>
    </section>
    <!-- bom明细编辑 弹窗end-->

    <!-- bom明细新增   弹窗-->
    <section bsModal #bomCodePageModal="bs-modal" id="bomCodePageModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width: 800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" (click)="bomCodePageClose(bomCodePageModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">BOM编码-新增</h4>
                </div>
                <div class="modal-body">
                    <div class="row form-horizontal">
                        <div>
                            <div class="page-header" style="font-size: 0;margin-top: -8px;border: none;">
                                <div>
                                    <div class="top_module">
                                        <span class="module_text">BOM编码</span>
                                        <input type="hidden" class="form-control" name="bomNumber" id="bomNumber" [(ngModel)]='bomFilterParam.bomNumber' />
                                        <div class="s_hover_box">
                                            <select class="select2" id="bomNumberSelect2">
                                                <option value=''></option>
                                            </select>
                                            <div class="s_del_icon" (click)='delBomNumber()'>x</div>
                                        </div>
                                    </div>
                                    <div class="top_module">
                                        <span class="module_text">描述</span>
                                        <input type="text" class="module_inp" [(ngModel)]="bomFilterParam.describe" (change)="bomFilterParamChange()" placeholder="BOM描述" />
                                    </div>
                                    <div class="top_module">
                                        <span class="module_text">线材数量</span>
                                        <input type="text" class="module_inp" [(ngModel)]="bomFilterParam.wireNum" (change)="bomFilterParamChange()" placeholder="线材数量" />
                                    </div>
                                </div>
                                <div class="top_module">
                                    <span class="module_text">主机类型</span>
                                    <select class="module_inp" name="salesType" [(ngModel)]="bomFilterParam.hostName" (change)="bomFilterParamChange()">
                                        <option value="">全部</option>
                                        <option *ngFor="let item of bomfilterList.host" [value]="item.productName">{{item.productName}}</option>
                                    </select>
                                </div>
                                <div class="top_module">
                                    <span class="module_text">传感器类型</span>
                                    <select class="module_inp" name="salesType" [(ngModel)]="bomFilterParam.sensorName" (change)="bomFilterParamChange()">
                                        <option value="">全部</option>
                                        <option *ngFor="let item of bomfilterList.sensor" [value]="item.productName">{{item.productName}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="bom-list">
                                <ul>
                                    <li class="lis" *ngFor="let item of bomCodePageList" [ngClass]="{'active':item.selected}">
                                        <span class="el-checkbox__inner checkbox-self" [ngClass]="{'is-checked':item.selected}" (click)="BOMItemSelect(item)"></span>
                                        <div class="lis-line" (click)="BOMItemSelect(item)">
                                            <span class="line-left">BOM编码</span><span class="line-right">{{item.bomNumber}}</span>
                                        </div>
                                        <div class="lis-line" (click)="BOMItemSelect(item)">
                                            <span class="line-left">描述</span><span class="line-right">{{item.describe}}</span>
                                        </div>
                                        <div class="lis-line" (click)="BOMItemSelect(item)">
                                            <span class="line-left">主机</span>
                                            <span class="line-right" *ngFor="let lis of item.materielMap.host">
                                                [ {{lis.productName}}:{{lis.num}}台 ]
                                            </span>
                                            <span class="line-right" *ngIf="item.materielMap.host.length == 0">--</span>
                                        </div>
                                        <div class="lis-line" (click)="BOMItemSelect(item)">
                                            <span class="line-left">传感器</span>
                                            <span class="line-right" *ngFor="let lis of item.materielMap.sensor">
                                                [ {{lis.productName}}:{{lis.num}}个 ]
                                            </span>
                                            <span class="line-right" *ngIf="item.materielMap.sensor.length == 0">--</span>
                                        </div>
                                        <div class="lis-line" (click)="BOMItemSelect(item)">
                                            <span class="line-left">线材</span>
                                            <span class="line-right" *ngFor="let lis of item.materielMap.wire">
                                                [ {{lis.productName}}:{{lis.num}}条 ]
                                            </span>
                                            <span class="line-right" *ngIf="item.materielMap.wire.length == 0">--</span>
                                        </div>
                                        <div class="bom-item-num">
                                            <span>数量</span>
                                            <input type="text" name="number" [(ngModel)]='item.count' class="bom-item-num-input" onkeyup="value = value.replace(/^(0+)|[^\d]+/g,'')" />
                                        </div>
                                    </li>
                                    <li *ngIf="bomCodePageList.length == 0" style="text-align: center;line-height: 60px;color: #ccc;">暂无符合条件的数据</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" (click)="bomCodePageClose(bomCodePageModal)">取消</button>
                    <button type="button" class="btn btn-primary" (click)="bomCodePagetSubmit(bomCodePageModal)">确认</button>
                </div>
            </div>
        </div>
    </section>
    <!-- bom明细新增 弹窗end-->
</div>
<!-- 导入弹框 -->
<div bsModal #weightModal="bs-modal" class="modal fade" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" (click)="cancelUp(weightModal)" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">上传Excel文件</h4>
            </div>
            <div class="modal-body">

                <div class="row">
                    <form class="form form-inline " role="form">

                        <div class="row" style="margin-bottom: 24px;">
                            <div class="form-group module_line">
                                <button type="button" class="btn btn-primary" (click)="load_module()">下载模板</button>
                                <span class="row" class="note">注：请先下载模板，采用模板编辑文件后上传</span>
                            </div>
                        </div>


                        <div class="row">
                            <!--<label class="control-label col-sm-1" for="imgFile" style="padding: 0;display: inline-block;line-height: 32px;">文件</label>-->
                            <div class="col-sm-10" style="padding: 0;">
                                <div class="clearfix module_line">
                                    <button type="button" class="btn btn-primary" style="width: 120px;">上传模板文件
                                        <input type="file" class="up" (change)="fileChange($event.target.files)" name="fileToUpload" (click)='clearFile()' [(ngModel)]='fileUp' type="file" placeholder='' />
                                    </button>
                                    <span class="row" class="note">注：格式excel</span>
                                </div>
                            </div>
                        </div>
                        <div *ngIf="fileToUpload">
                            <label class="control-label col-sm-1"></label>
                            <div>
                                <ul>
                                    <li class="file_list"><i class="fa fa-file-text-o" style="margin-right: 12px;"></i>{{fileToUpload.name}}<i class="fa fa-check-circle green" style="margin-left: 60px;"></i></li>
                                </ul>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" (click)="cancelUp(weightModal)">取消</button>
                <button type="button" class="btn btn-primary" (click)="submitData(weightModal)">确认</button>
            </div>
        </div>
    </div>
</div>
<style>
    .radioSales {
        margin: 8px 8px 0 0;
        /* padding-top: 29px; */
        position: relative;
        top: 1px;
    }

</style>
<!-- 导入弹框 结束 -->